#define _CRT_SECURE_NO_WARNINGS 1
#include"SList.h"

void SListTest01()
{
	SLTNode* node1 = (SLTNode*)malloc(sizeof(SLTDataType));
	node1->data = 1;

	SLTNode* node2 = (SLTNode*)malloc(sizeof(SLTDataType));
	node2->data = 2;

	SLTNode* node3 = (SLTNode*)malloc(sizeof(SLTDataType));
	node3->data = 3;

	SLTNode* node4 = (SLTNode*)malloc(sizeof(SLTDataType));
	node4->data = 4;

	node1->next = node2;
	node2->next = node3;
	node3->next = node4;
	node4->next = NULL;

	SLTNode* plist = node1;
	SLTPrint(plist);
}

void SListTest02()
{
	SLTNode* plist = NULL;
	SLTPushFront(&plist, 1);
	SLTPrint(plist);

	SLTNode* find = SLTFind(plist, 3);
	SLTErase(&plist, find);
	SLTInsert(&plist, find, 11);
	SLTPrint(plist);
}
int main()
{
	SListTest01();
	SListTest02();
	return 0;
}